import request from '../utils/request'
import { HttpMethod } from '../utils/http'


export default {
  // 添加客户购物车
  saveCart (data) {
    return request({
      url: '/beauty/cartItem/saveCart',
      method: HttpMethod.POST,
      data
    })
  },
  // 获取全部客户购物车所有商品信息
  getCartProducts () {
    return request({
      url: `/beauty/cartItem/getCartProducts`,
      method: HttpMethod.GET
    })
  },
  // 根据商品id移除购物车
  removeCart (productId) {
    return request({
      url: `/beauty/cartItem/removeCart/${productId}`,
      method: HttpMethod.DELETE
    })
  }
}
